/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DTO;

import java.sql.Date;

/**
 *
 * @author Endlesslove
 */
public class HoaDon  implements  Idata
{
    private String MaHoaDon;
    public String NgayLap;
    public String MaKhachHang;
    public Integer TongTien;
    
    public HoaDon(String ...param)
    {
        MaHoaDon = param[0];
        NgayLap = param[1];
        MaKhachHang = param[2];
        TongTien = Integer.parseInt(param[3]);
    }
    
    @Override
    public boolean Delete() 
    {
        return new BUS.HoaDon().Delete(this);
    }

    @Override
    public boolean Insert() 
    {
        return new BUS.HoaDon().Insert(this);
    }

    @Override
    public boolean Update() 
    {
        return new BUS.HoaDon().Update(this);
    }

    @Override
    public Object[] getObjects() 
    {
        return new Object []
        {
          MaHoaDon, NgayLap, MaKhachHang, TongTien  
        };
    }
    @Override
    public String getID() 
    {
        return MaHoaDon;
    }
    
}
